import request from "@/common/js/request.js";
import requestJson from "@/common/js/requestJson.js";

const api = {
	login: (params) => {
		return request({
			url: "/user/login",
			method: "post",
			data: params,
		});
	},

	// 客户列表
	bills: (params) => {
		return request({
			url: "/user/bill_hospitals",
			method: "post",
			data: params,
		});
	},
	// 根据客户筛选账单编号
	bills_detail: (params) => {
		return request({
			url: "/user/bills",
			method: "post",
			data: params,
		});
	},

	// 账户列表
	accounts: (params) => {
		return request({
			url: "/user/accounts",
			method: "post",
			data: params,
		});
	},
	// 财务分类的分类
	finance_cates: (params) => {
		return request({
			url: "/user/finance_cates",
			method: "post",
			data: params,
		});
	},
	// 申请人列表
	apply_users: (params) => {
		return request({
			url: "/user/apply_users",
			method: "post",
			data: params,
		});
	},
	//获取财务分类
	finances: (params) => {
		return request({
			url: "/user/finances",
			method: "post",
			data: params,
		});
	},
	//添加账单
	add_bill: (params) => {
		return request({
			url: "/user/add_bill",
			method: "post",
			data: params,
		});
	},
	//获取七牛云上传图片token
	qiniu_token: (params) => {
		return request({
			url: "/user/qiniu_token",
			method: "post",
			data: params,
		});
	},
	//七牛云上传图片
	qiniup: (params) => {
		return request({
			url: "https://up-z2.qiniup.com",
			method: "post",
			data: params,
		});
	},
	//部门列表
	department: (params) => {
		return request({
			url: "/user/department",
			method: "post",
			data: params,
		});
	},
	//申请人列表
	apply_users: (params) => {
		return request({
			url: "/user/apply_users",
			method: "post",
			data: params,
		});
	},
	//审核列表
	bill_lists: (params) => {
		return request({
			url: "/user/bill_lists",
			method: "post",
			data: params,
		});
	},
	//账单详情
	bill_item_info: (params) => {
		return request({
			url: "/user/bill_item_info",
			method: "post",
			data: params,
		});
	},
	//审批
	verify_bill: (params) => {
		return request({
			url: "/user/verify_bill",
			method: "post",
			data: params,
		});
	},

	//用户首页
	user_index: (params) => {
		return request({
			url: "/user/user_index",
			method: "post",
			data: params,
		});
	},
	//用户区域
	user_area: (params) => {
		return request({
			url: "/user/user_area",
			method: "post",
			data: params,
		});
	},
	//应收款
	no_pay_bill_lists: (params) => {
		return request({
			url: "/user/no_pay_bill_lists",
			method: "post",
			data: params,
		});
	},
	//根据区域id获取客户列表
	area_hospitals: (params) => {
		return request({
			url: "/user/area_hospitals",
			method: "post",
			data: params,
		});
	},
	//账户详情
	account_lists: (params) => {
		return request({
			url: "/user/account_lists",
			method: "post",
			data: params,
		});
	},
	//回款率
	refund_bill_lists: (params) => {
		return request({
			url: "/user/refund_bill_lists",
			method: "post",
			data: params,
		});
	},
	//客户含金量
	gold_lists: (params) => {
		return request({
			url: "/user/gold_lists",
			method: "post",
			data: params,
		});
	},
	//账户详情
	account_lists: (params) => {
		return request({
			url: "/user/account_lists",
			method: "post",
			data: params,
		});
	},
	//比对列表
	compare_lists: (params) => {
		return request({
			url: "/user/compare_lists",
			method: "post",
			data: params,
		});
	},
	//收支明细
	account_log_lists: (params) => {
		return request({
			url: "/user/account_log_lists",
			method: "post",
			data: params,
		});
	},
	//添加预收款账单
	add_pre_bill: (params) => {
		return request({
			url: "/user/add_pre_bill",
			method: "post",
			data: params,
		});
	},

	//预收款
	pre_bill_lists: (params) => {
		return request({
			url: "/user/pre_bill_lists",
			method: "post",
			data: params,
		});
	},

	//核销列表
	check_bill_list: (params) => {
		return request({
			url: "/user/check_bill_list",
			method: "post",
			data: params,
		});
	},
	//核销
	check_bill: (params) => {
		return requestJson({
			url: "/user/check_bill",
			method: "post",
			data: params,
		});
	},
	//营业额列表
	yy_lists: (params) => {
		return requestJson({
			url: "/user/yy_lists",
			method: "post",
			data: params,
		});
	},
	//撤回
	revoke_bill: (params) => {
		return requestJson({
			url: "/user/revoke_bill",
			method: "post",
			data: params,
		});
	},
	// 账单详情
	bill_info: (params) => {
		return requestJson({
			url: "/user/bill_info",
			method: "post",
			data: params,
		});
	},
	// 	获取附近诊所
	get_nearby_clinic: (params) => {
		return requestJson({
			url: "/user/outpatient_lists",
			method: "post",
			data: params,
		});
	},
	// 	添加诊所
	add_clinic: (params) => {
		return requestJson({
			url: "/user/add_outpatient",
			method: "post",
			data: params,
		});
	},
	// 	诊所详情
	clinic_info: (params) => {
		return requestJson({
			url: "/user/outpatient_info",
			method: "post",
			data: params,
		});
	},
	// 	添加诊所拜访
	add_clinic_visit: (params) => {
		return requestJson({
			url: "/user/add_outpatient_visit",
			method: "post",
			data: params,
		});
	},
	// 	所有门诊列表
	all_clinic: (params) => {
		return requestJson({
			url: "/user/outpatient_lists_all",
			method: "post",
			data: params,
		});
	},
	// 	业务员列表
	user_lists: (params) => {
		return requestJson({
			url: "/user/outpatient_users_all",
			method: "post",
			data: params,
		});
	},
	// 	拜访列表
	visit_lists: (params) => {
		return requestJson({
			url: "/user/outpatient_visit_lists",
			method: "post",
			data: params,
		});
	},
	// 	查看拜访详情
	visit_info: (params) => {
		return requestJson({
			url: "/user/outpatient_visit_info",
			method: "post",
			data: params,
		});
	},
	// 	修改拜访
	edit_visit: (params) => {
		return requestJson({
			url: "/user/edit_outpatient_visit",
			method: "post",
			data: params,
		});
	},
};

export default api;
